package com.cheer;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;

import java.util.Date;

public class Compute {


    /**
     * 检查当前openid在哪一个表中
     * @param args
     */
    public static void main(String[] args) {
        int abs = Math.abs(("odBjpjrWqdPbFoizjoCUxIebn9p4".hashCode()) % 32);
        System.out.println(abs);
        System.out.println(getCreditYearKey(1, new Date()));
        /*DateTime yyyyMMdd = DateUtil.parse("20231205", "yyyyMMdd");
        System.out.println( "the current time" + yyyyMMdd.getTime()/1000);*/
    }

    // 日志分析
    public static String getCreditYearKey(Integer userId, Date date){
        return userId+"_credit_"+ DateUtil.format(date, "yyyy");
    }
}
